<template>
	<div class="home">
		<!-- 	<div id="nav">
			<router-link to="/recommend">推荐</router-link> |
			<router-link to="/rank">排行</router-link> |
			<router-link to="/search">搜索</router-link>
		</div> -->
		<van-tabs v-model="tab_act" @change='tab_change'>
			<van-tab name="Recommend" title="标签 1">推荐</van-tab>
			<van-tab name="Rank" title="标签 2">排行</van-tab>
			<van-tab name="Search" title="标签 3">搜索</van-tab>
		</van-tabs>

		<!-- 用于渲染二级路由内容 -->
		<router-view></router-view>
	</div>
</template>

<script>
	// @ is an alias to /src

	
	export default {
		name: 'Home',
		data(){
			return {
				tab_act:0,
			}
		},
		components: {

		},
		methods:{
			tab_change(name, title){
				console.log(name, title);
				this.$router.push({
					name,
				})
			},
		},
	}
</script>

<style lang="scss" scoped>
	.van-tabs__line{
		background-color: blue;
	}
</style>
